Previous | Index | Next |

Bidirectional iterators

Bidirectional iterators must implements the methods defined in the interface BidirectionalIterator api. These methods, addition to the requirements of forward iterators, are summarized in the table below. Assume that r is a bidirectional iterator.

Forward iterator requirements
expression return type assertion/note
pre/post-condition
r.prev() Iterator Move the iterator backwards.

NOTE: Bidirectional iterators allow algorithms to move iterators backward as well as forward.


Previous | Index | Next |